package com.service.Impl;

import com.dao.TestDao;
import com.mypg.Test;
import com.service.TestService;

import java.util.List;

public class TestServiceImpl implements TestService {

    private TestDao testDao;

    public TestServiceImpl(){}
    public TestServiceImpl(TestDao testDao) {
        this.testDao = testDao;
    }

    @Override
    public List<Test> selectTestByUser_idAndQuestion_class(int user_id, String question_class) {
        return testDao.selectTestByUser_idAndQuestion_class(user_id,question_class);
    }

    @Override
    public int selectTestCountByUser_idAndQuestion_class(int user_id, String question_class) {
        return testDao.selectTestCountByUser_idAndQuestion_class(user_id,question_class);
    }

    @Override
    public void insertTest(Test test) {
        testDao.insertTest(test);
    }

    public TestDao getTestDao() {
        return testDao;
    }

    public void setTestDao(TestDao testDao) {
        this.testDao = testDao;
    }
}
